#define _CRT_SECURE_NO_WARNINGS

#include "Heap.h"

void HeapTest()
{
	HP ph;
	HPInit(&ph);

	//HPPush(&ph, 1);
	//HPPush(&ph, 2);
	//HPPush(&ph, 3);
	//HPPush(&ph, 4);
	//HPPush(&ph, 5);
	//HPPush(&ph, 6);
	//HPPrint(&ph);

	//HPPop(&ph);
	//HPPrint(&ph);
	//HPPop(&ph);
	//HPPrint(&ph);
	//HPPop(&ph);
	//HPPrint(&ph);
	//HPPop(&ph);
	//HPPrint(&ph);
	//HPPop(&ph);
	//HPPrint(&ph);

	HPtype arr[] = { 23,43,12,34,6,5,44,11,24,33,56 };
	HPSort(arr, sizeof(arr) / sizeof(arr[0]));
	for (int i = 0; i < sizeof(arr) / sizeof(arr[0]); i++)
	{
		printf("%d ", arr[i]);
	}
	//for (int i = 0; i < sizeof(arr) / sizeof(arr[0]); i++)
	//{
	//	HPPush(&ph, arr[i]);
	//	HPPrint(&ph);
	//}
	//for (int i = 0; i < 5; i++)
	//{
	//	printf("%d ", ph.a[0]);
	//	HPPop(&ph);
	//}
	//printf("\n");
	//HPPrint(&ph);

	//int sz = sizeof(arr) / sizeof(arr[0]);
	//HPCreate(&ph, arr, sz);
	//HPPrint(&ph);

	HPDestroy(&ph);
}

int main()
{
	HeapTest();

	return 0;
}